package com.xssq.utils.webSocket;

import javax.websocket.Session;
import java.util.Map;

/**
 * @author xssq
 * @version 1.0.0
 * @date 2023/09/02 09:00:43
 * @saying 你可以不会但你必须得知道
 */
public interface WebSocketService {
    void onOpen(Map<String, Session> sessionMap, Session session, String id);

    void onMessage(Map<String, Session> sessionMap, Session session, String message);

    void onClose(Map<String, Session> sessionMap, Session session);

    void onError(Map<String, Session> sessionMap, Session session, Throwable error);
}
